/***************************************************************************
 * Device Manager
 * -instantiates the listener and handler
 * -acts as the liaison between the Kinect code and the Fotowall code
 * -sets up the signal/slot connections
 *                                                                         
 ***************************************************************************/

#ifndef DEVICEMANAGER_H
#define DEVICEMANAGER_H

#include "MainWindow.h"
#include "Desk.h"
#include "devices/StateHandler.h"
#include "devices/KeyboardHandler.h"
#include "devices/KeyboardListener.h"
#include "devices/InputPoint.h"
#include "KinectListener.h"

class DeviceManager: public QObject {
    Q_OBJECT
public:
    DeviceManager(MainWindow &mw, Desk &d, QObject *parent = 0);
    ~DeviceManager();

	void init();
	void startTimer();

private:
    MainWindow *m_mainWindow;
	Desk *m_desk;
    KinectListener *m_listener;
	KeyboardListener *m_keyboardlistener;  
    StateHandler *m_handler;

	//timer to check for disconnected Kinect
	QTimer *m_checkDisconnectTimer;

private slots:
	void checkForDisconnect();
};

#endif // DEVICEMANAGER_H
